package com.hsmpay.mobile.service.bank.impl;

import com.hsmpay.common.service.impl.BaseServiceSupport;
import com.hsmpay.mobile.dao.bank.BankCodeDao;
import com.hsmpay.mobile.pojo.bank.BankCode;
import com.hsmpay.mobile.service.bank.BankCodeService;
import org.springframework.stereotype.Repository;

import javax.annotation.Resource;

/**
 * 合作银行业务接口实现类 bankService
 * 对应数据层 bankDao
 *
 * @author 颜铃璋
 * @date 2013-1-5
 */
@Repository("bankCodeService")
public class BankCodeServiceImpl extends BaseServiceSupport<BankCode, Long> implements BankCodeService<BankCode, Long> {
    @Resource(name = "bankCodeDao")
    private BankCodeDao<BankCode, Long> bankCodeDao;

    /**
     * 根据卡号 查询出卡的  所属行
     *
     * @param card
     * @return
     * @throws Exception
     */
    public String searchBankNameByCard(String card) throws Exception {
        return bankCodeDao.searchBankNameByCard(card);
    }
}
